const Koa = require('koa');
const app = new Koa();
const path = require('path');
const static = require('koa-static');
const render = require('koa-art-template');


app.use(static(path.join(__dirname, 'public')));

//配置模板引擎
render(app, {
	root: path.join(__dirname, 'views'),
	extname: '.html',
	debug: process.env.NODE_ENV !== 'production'
});

app.use(async (ctx) =>{
	await ctx.render('movie');
});

app.listen(3000,function () {
	console.log('Web Server listen 3000')
});